<?php


namespace app\api\controller;


use app\common\model\Orders;
use app\common\model\Users;

class User extends Api
{
    protected $needAuth = true;

    public function getTravel() {
        $id = $this->uid;

        if (!$id) {
            return $this->error('超时，请重新登录！');
        }

        $result = Orders::with(['users','driver','car'])->where('user_id',$id)
            ->select();

        return $this->success($result);
    }
}